package com.itheima;

import jdk.jfr.DataAmount;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @ProjectName: ybxy6
 * @Titile: Student
 * @Author: 86183
 * @Description: TODO
 */
@Data
@AllArgsConstructor
public class Student implements Comparable<Student> {
    private String name;
    private int age;

    public int compareTo(Student o) {
        return this.age - o.getAge();
    }
}
